import { createRouterMap } from "./create-routerMap";
export function createMatcher(routes) { // 


    let { pathMap } = createRouterMap(routes)


    function addRouters(routes) {
        createRouterMap(routes, pathMap)
    }

    function addRouter(route) {
        createRouterMap([route], pathMap)
    }

    function match(path) {
        return pathMap[path]
    }

    return {
        addRouters,
        addRouter,
        match,
    }


}

